//package com.zhijiang.hospital.service.impl;
//
//
//import com.zhijiang.hospital.entrty.User;
//import com.zhijiang.hospital.mapper.UserMapper;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.Objects;
//
///**
// * @author 75936
// * @version 1.0
// * @project zhiJiangHealthBureau
// * @description
// * @date 2022-12-16 10:58:44
// */
//@Service
//public class UserDetilsServiceImpl implements UserDetailsService {
//    @Autowired
//    UserMapper userMapper;
//    @Override
//    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//        User one = userMapper.findOne(username);
//        if (Objects.isNull(one)){
//            throw new RuntimeException("账号错误");
//        }
//        return new LoginUser(one);
//    }
//}
